package com.geqian.web.serializer;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.TreeNode;
import com.fasterxml.jackson.databind.BeanProperty;
import com.fasterxml.jackson.databind.ObjectMapper;

public class StringToLongConverter implements DeserializationConverter {

    @Override
    public Object conversion(TreeNode treeNode, BeanProperty beanProperty, ObjectMapper objectMapper) throws JsonProcessingException {

        return objectMapper.treeToValue(treeNode,Long.class);
    }

}